package org.example.xls.service.impl;

import org.example.xls.mapper.ConsultantMapper;
import org.example.xls.pojo.dto.ConsultantAppointmentDTO;
import org.example.xls.pojo.vo.ConsultantVO;
import org.example.xls.service.ConsultantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ConsultantServiceImpl implements ConsultantService {
    @Autowired
    private ConsultantMapper consultantMapper;

    /**
     * 实现前端查询列表功能
     * @return
     */
    @Override
    public List<ConsultantVO> selectAll() {
        return consultantMapper.selectAll();
    }

    /**
     * 查询咨询师姓名列表
     * @return
     */
    @Override
    public List<String> getConsultantNameList() {
        return consultantMapper.selectName();
    }

    /**
     * 预约咨询（提交预约）
     * @param consultantAppointmentDTO
     */
    @Override
    public void appointment(ConsultantAppointmentDTO consultantAppointmentDTO) {
        consultantMapper.appointment(consultantAppointmentDTO);
    }
}